<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Doxygen example: nRF24L01 Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Doxygen example
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">nRF24L01 Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="classn_r_f24_l01-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4392a317b65252b3d620a6c557f5f148"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a4392a317b65252b3d620a6c557f5f148">nRF24L01</a> ()</td></tr>
<tr class="memitem:aa436e2da2244f8b76c102683272d5fa8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#aa436e2da2244f8b76c102683272d5fa8">nRF24L01</a> (uint8_t ch, uint8_t pl)</td></tr>
<tr class="memitem:a46c2fc5ad6598ededbecdbcb2cee5209"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a46c2fc5ad6598ededbecdbcb2cee5209">init</a> ()</td></tr>
<tr class="memdesc:a46c2fc5ad6598ededbecdbcb2cee5209"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes MCU to communicate with nRF25L01 module.  <a href="#a46c2fc5ad6598ededbecdbcb2cee5209"></a><br/></td></tr>
<tr class="memitem:a3f658b56f150311dc6a2836876deee06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a3f658b56f150311dc6a2836876deee06">setMode</a> (uint8_t m)</td></tr>
<tr class="memdesc:a3f658b56f150311dc6a2836876deee06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets mode to either receive or transmit.  <a href="#a3f658b56f150311dc6a2836876deee06"></a><br/></td></tr>
<tr class="memitem:ab4f950b967293baae91196fcb8e5a3c4"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#ab4f950b967293baae91196fcb8e5a3c4">getMode</a> (void)</td></tr>
<tr class="memdesc:ab4f950b967293baae91196fcb8e5a3c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve mode.  <a href="#ab4f950b967293baae91196fcb8e5a3c4"></a><br/></td></tr>
<tr class="memitem:a225b0e2e380f86d846b96af343c3380b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a225b0e2e380f86d846b96af343c3380b">setRXAddress</a> (uint8_t *address)</td></tr>
<tr class="memitem:abf3f5c8e5f7f8f409eec13056be56b7a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#abf3f5c8e5f7f8f409eec13056be56b7a">setRXAddress</a> (uint8_t dataPipe, uint8_t *address)</td></tr>
<tr class="memitem:adcbfc14dcdbfc5d7ef840a471e41f91c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#adcbfc14dcdbfc5d7ef840a471e41f91c">setTXAddress</a> (uint8_t *address)</td></tr>
<tr class="memdesc:adcbfc14dcdbfc5d7ef840a471e41f91c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the transmit address.  <a href="#adcbfc14dcdbfc5d7ef840a471e41f91c"></a><br/></td></tr>
<tr class="memitem:a6741bcd4f708821352401b9881f77c59"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a6741bcd4f708821352401b9881f77c59">dataReady</a> (void)</td></tr>
<tr class="memdesc:a6741bcd4f708821352401b9881f77c59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if data is available for reading.  <a href="#a6741bcd4f708821352401b9881f77c59"></a><br/></td></tr>
<tr class="memitem:aa5e0e8a467af8cfcf264442f4d87411c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#aa5e0e8a467af8cfcf264442f4d87411c">readPayload</a> (uint8_t *datain)</td></tr>
<tr class="memitem:a7fdf8f83f4f5a402f22aee6a20a7b581"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a7fdf8f83f4f5a402f22aee6a20a7b581">sendPayload</a> (uint8_t *dataout, uint8_t length)</td></tr>
<tr class="memdesc:a7fdf8f83f4f5a402f22aee6a20a7b581"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends out a multiple-byte payload.  <a href="#a7fdf8f83f4f5a402f22aee6a20a7b581"></a><br/></td></tr>
<tr class="memitem:ad51e0ef24f71b5155f80cd9abb752fc4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#ad51e0ef24f71b5155f80cd9abb752fc4">setChannel</a> (uint8_t ch)</td></tr>
<tr class="memdesc:ad51e0ef24f71b5155f80cd9abb752fc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the frequency channel <a class="el" href="classn_r_f24_l01.html">nRF24L01</a> operates on.  <a href="#ad51e0ef24f71b5155f80cd9abb752fc4"></a><br/></td></tr>
<tr class="memitem:a835d79477f6d01ce0a0fb865799a2b01"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a835d79477f6d01ce0a0fb865799a2b01">getChannel</a> (uint8_t ch)</td></tr>
<tr class="memdesc:a835d79477f6d01ce0a0fb865799a2b01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the frequency channel <a class="el" href="classn_r_f24_l01.html">nRF24L01</a> operates on.  <a href="#a835d79477f6d01ce0a0fb865799a2b01"></a><br/></td></tr>
<tr class="memitem:ac6558318d4e55b6a79f2796047f0d9fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#ac6558318d4e55b6a79f2796047f0d9fe">setPayloadLength</a> (uint8_t length)</td></tr>
<tr class="memdesc:ac6558318d4e55b6a79f2796047f0d9fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the length of the payload to be in data pipe 0.  <a href="#ac6558318d4e55b6a79f2796047f0d9fe"></a><br/></td></tr>
<tr class="memitem:a467c306a3f9fa0e394cc30b8d8b53e3e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a467c306a3f9fa0e394cc30b8d8b53e3e">setPayloadLength</a> (uint8_t dataPipe, uint8_t length)</td></tr>
<tr class="memdesc:a467c306a3f9fa0e394cc30b8d8b53e3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the length of the payload to be in specified data pipe.  <a href="#a467c306a3f9fa0e394cc30b8d8b53e3e"></a><br/></td></tr>
<tr class="memitem:ac635aa1fe319141a6291d179266f4094"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#ac635aa1fe319141a6291d179266f4094">write</a> (uint8_t reg)</td></tr>
<tr class="memdesc:ac635aa1fe319141a6291d179266f4094"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a 1-byte command into the assigned register.  <a href="#ac635aa1fe319141a6291d179266f4094"></a><br/></td></tr>
<tr class="memitem:a135a296739d60d269ca426a6f657cd63"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a135a296739d60d269ca426a6f657cd63">write</a> (uint8_t reg, uint8_t data)</td></tr>
<tr class="memdesc:a135a296739d60d269ca426a6f657cd63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes 1 byte into the specified register.  <a href="#a135a296739d60d269ca426a6f657cd63"></a><br/></td></tr>
<tr class="memitem:aaa77ddee1a1d366f8008f6d897232942"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#aaa77ddee1a1d366f8008f6d897232942">write</a> (uint8_t reg, uint8_t *data, uint8_t length)</td></tr>
<tr class="memdesc:aaa77ddee1a1d366f8008f6d897232942"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes multiple bytes into the specified register.  <a href="#aaa77ddee1a1d366f8008f6d897232942"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa47c2eea0705d99f9515043892a11f85"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa47c2eea0705d99f9515043892a11f85"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#aa47c2eea0705d99f9515043892a11f85">status</a></td></tr>
<tr class="memdesc:aa47c2eea0705d99f9515043892a11f85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updated every time a command is sent to the <a class="el" href="classn_r_f24_l01.html">nRF24L01</a>. <br/></td></tr>
<tr class="memitem:a9f4e136c7bf5375bd6a0543cc892ecce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f4e136c7bf5375bd6a0543cc892ecce"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classn_r_f24_l01.html#a9f4e136c7bf5375bd6a0543cc892ecce">mode</a></td></tr>
<tr class="memdesc:a9f4e136c7bf5375bd6a0543cc892ecce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set to either NRF24L01_MODE_RX or NRF24L01_MODE_TX. <br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a0d5c6e79a32e4f792195a9aa5ae1b778"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d5c6e79a32e4f792195a9aa5ae1b778"></a>
static <a class="el" href="classn_r_f24_l01.html">nRF24L01</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>pNRF24L01</b></td></tr>
</table>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a4392a317b65252b3d620a6c557f5f148"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">nRF24L01::nRF24L01 </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Basic constructor. Sets default channel and payload length. </p>

</div>
</div>
<a class="anchor" id="aa436e2da2244f8b76c102683272d5fa8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">nRF24L01::nRF24L01 </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pl</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Custom constructor. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">ch</td><td>Custom channel. </td></tr>
    <tr><td class="paramname">pl</td><td>Custom payload length. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6741bcd4f708821352401b9881f77c59"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t nRF24L01::dataReady </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks if data is available for reading. </p>
<dl class="section return"><dt>Returns:</dt><dd>0 if in TX mode or there is no data in the RX FIFO 1 if there is data in the RX FIFO to be read </dd></dl>

</div>
</div>
<a class="anchor" id="a835d79477f6d01ce0a0fb865799a2b01"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t nRF24L01::getChannel </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the frequency channel <a class="el" href="classn_r_f24_l01.html">nRF24L01</a> operates on. </p>
<p>Reads from the RF_CH register. 1 MHz steps. Freq = 2400 + RF_CH [MHz]. </p>
<dl class="section return"><dt>Returns:</dt><dd>Channel. Must be between 0 and 127(0x7F). </dd></dl>

</div>
</div>
<a class="anchor" id="ab4f950b967293baae91196fcb8e5a3c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t nRF24L01::getMode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve mode. </p>
<dl class="section return"><dt>Returns:</dt><dd>NRF24L01_MODE_TX or NRF24L01_MODE_RX </dd></dl>

</div>
</div>
<a class="anchor" id="a46c2fc5ad6598ededbecdbcb2cee5209"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes MCU to communicate with nRF25L01 module. </p>
<p>Initializes MCU pins, interrupt, and SPI module. Should be called during startup. </p>

</div>
</div>
<a class="anchor" id="aa5e0e8a467af8cfcf264442f4d87411c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::readPayload </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>datain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read RX-Payload, length is determined by function <a class="el" href="classn_r_f24_l01.html#ac6558318d4e55b6a79f2796047f0d9fe" title="Sets the length of the payload to be in data pipe 0.">setPayloadLength()</a>. Starts with byte 0. Payload is deleted by <a class="el" href="classn_r_f24_l01.html">nRF24L01</a> after it is read. Data Ready (RX_DR) bit of STATUS register is reset. Used in RX mode. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">datain</td><td>Pointer to be filled with payload. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7fdf8f83f4f5a402f22aee6a20a7b581"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::sendPayload </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>dataout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends out a multiple-byte payload. </p>
<p>Sets mode to TX, flushes TX FIFO, writes payload to TX FIFO, begins transmission. 1–32 bytes. always starts at byte 0 used in TX payload. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataout</td><td>Pointer to data to be sent. </td></tr>
    <tr><td class="paramname">length</td><td>Number of bytes in dataout. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad51e0ef24f71b5155f80cd9abb752fc4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::setChannel </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the frequency channel <a class="el" href="classn_r_f24_l01.html">nRF24L01</a> operates on. </p>
<p>Writes to the RF_CH register. 1 MHz steps. Freq = 2400 + RF_CH [MHz]. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">ch</td><td>Channel. Must be between 0 and 127(0x7F). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3f658b56f150311dc6a2836876deee06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::setMode </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets mode to either receive or transmit. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Set to either NRF24L01_MODE_RX or NRF24L01_MODE_TX. Defaults to RX if invalid value is sent. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac6558318d4e55b6a79f2796047f0d9fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::setPayloadLength </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>length</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the length of the payload to be in data pipe 0. </p>
<p>1-32 bytes long. </p>

</div>
</div>
<a class="anchor" id="a467c306a3f9fa0e394cc30b8d8b53e3e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::setPayloadLength </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dataPipe</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the length of the payload to be in specified data pipe. </p>
<p>1-32 bytes long. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataPipe</td><td>Index of data pipe - 0-5. </td></tr>
    <tr><td class="paramname">length</td><td>Length of specified data pipe. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a225b0e2e380f86d846b96af343c3380b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::setRXAddress </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>address</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the receive address of data pipe 0. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>The 5-byte address to assign to data pipe 0. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abf3f5c8e5f7f8f409eec13056be56b7a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::setRXAddress </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dataPipe</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the receive address of any data pipe. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataPipe</td><td>Value 0 through 5 representing the index of the datapipe to be addressed. </td></tr>
    <tr><td class="paramname">address</td><td>The 5-byte address to assign to data pipe 0. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="adcbfc14dcdbfc5d7ef840a471e41f91c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::setTXAddress </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>address</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the transmit address. </p>
<p>Used for a PTX (primary transmit) device only. Set the receive address of data pipe 0 to the same address to handle automatic acknowledge if this is a PTX device with Enhanced Shockburst enabled. (see <a class="el" href="classn_r_f24_l01.html">nRF24L01</a> datasheet) </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>The 5-byte address to assign to data pipe 0. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac635aa1fe319141a6291d179266f4094"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>reg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a 1-byte command into the assigned register. </p>
<p>Used for 1-byte commands that return no value after the STATUS byte. Sets status = STATUS register </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">reg</td><td>The register to be accessed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a135a296739d60d269ca426a6f657cd63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes 1 byte into the specified register. </p>
<p>Used for registers that have 1-byte values written to them. Sets status = STATUS register </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">reg</td><td>The register to be accessed. </td></tr>
    <tr><td class="paramname">data</td><td>The data you want written there. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aaa77ddee1a1d366f8008f6d897232942"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nRF24L01::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes multiple bytes into the specified register. </p>
<p>Used for registers that have multiple bytes written to them. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">reg</td><td>The register to be accessed </td></tr>
    <tr><td class="paramname">val</td><td>Pointer to values to be written </td></tr>
    <tr><td class="paramname">length</td><td>Number of bytes to be written </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>C:/Users/myQ_2/Google Drive/Atmel Studio/my includes/<a class="el" href="n_r_f24_l01_8h_source.html">nRF24L01.h</a></li>
<li>C:/Users/myQ_2/Google Drive/Atmel Studio/my includes/nRF24L01.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Nov 9 2013 22:27:52 for Doxygen example by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
